<template>
	<view class="helpdetail">
		<view class="content">
			<view class="title">
				{{title}}
			</view>
			<view class="text">
				{{content}}
			</view>
			
		</view>
		
	</view>
</template>

<script>
	import{problem} from "@/api/api.js"
	export default{
		data(){
			return{
				pageId:"",
				title:"",
				content:""
			}
		},
		onLoad(options) {
			if (!uni.getStorageSync("token")) {
				uni.reLaunch({
					url: "../login/index"
				})
				return
			}
			this.pageId = options.id
			this.handleproblemDetail()
		},
		methods:{
			async handleproblemDetail(){
				let res = await problem({
					id:this.pageId
				})
				this.title = res.data.title
				this.content = res.data.content
				console.log("问题详情",res)
			}
		}
	}
</script>

<style scoped lang="scss">
	.helpdetail{
		padding: 0 30rpx;
		box-sizing: border-box;
		.content{
			width: 100%;
			background: #FFFFFF;
			border-radius: 6rpx 6rpx 6rpx 6rpx;
			padding: 12rpx 22rpx;
			box-sizing: border-box;
			.title{
				font-size: 30rpx;
				font-family: PingFang SC-Medium, PingFang SC;
				font-weight: 400;
				color: #333333;
				line-height: 42rpx;
			}
			.text{
				font-size: 28rpx;
				font-family: PingFang SC-Medium, PingFang SC;
				font-weight: 400;
				color: #333333;
				line-height: 40rpx;
				margin-top: 20rpx;
			}
		}
	}
</style>